import { createRouter,createWebHistory } from "vue-router";
import Login from "../src/components/Login.vue";
import Register from "../src/components/Register.vue";
import Home from "../src/views/Home.vue";
import Todos from "../src/components/Todos.vue";
import Netease from '../src/views/NetEase.vue';
import Living from '../src/views/Living.vue';

const routes = [
  {
    path: "/",
    name: "login",
    component: Login,
  },
  {
    path: "/register",
    name: "register",
    component: Register,
  },
  {
    path: "/home",
    name: "home",
    component: Home,
    children: [
      {
        path: "/home/todos",
        name: "todos",
        component: Todos,
      },
      {
        path: "/home/netease",
        name: "netease",
        component: Netease,
      },
      {
        path: "/home/living",
        name: "living",
        component: Living,
      },
    ]
  },

];

const router = createRouter({
  history: createWebHistory(),
  routes: routes
});
export default router;